; (function ($) {
    $.tankBattles = $.tankBattles || {};
    $.tankBattles.strategies = $.tankBattles.strategies || {};

    var direction = $.tankBattles.enum.direction;

    $.tankBattles.strategies.simpleRocket = {
        move: function (dt) {
            var rocket = this;
            if (rocket.stopped) return;

            if (rocket.direction == direction.up) {
                rocket.y -= rocket.speed * dt;
            }
            else if (rocket.direction == direction.left) {
                rocket.x -= rocket.speed * dt;
            }
            else if (rocket.direction == direction.right) {
                rocket.x += rocket.speed * dt;
            }
            else if (rocket.direction == direction.down) {
                rocket.y += rocket.speed * dt;
            }
        },
        destroy: function (callback) {
            var rocket = this;
            rocket.stopped = true;
            rocket.image = rocket.animationImage;
        }
    };
})(epam = typeof epam !== "undefined" ? epam : {});
